#ifndef application_h
#define application_h

#include <Awesomium\WebCore.h>
#include <Awesomium\STLHelpers.h>
#include <Awesomium\BitmapSurface.h>
#include <SDL.h>
#include <TL\String.h>
#include <fstream>


using namespace Awesomium;


class Application {
private:
    SDL_Renderer *m_Renderer;
    SDL_Texture *m_ScreenTexture;
    SDL_Window *m_Window;

    WebCore *m_Core;
    WebSession *m_Session;
    WebView *m_Tab;

    int m_Width, m_Height;
    bool m_Running;

private:
    Application(const Application &);
    Application &operator=(const Application &);

private:
    void on_cleanup();
    void on_close();
    void on_display();
    void on_event(const SDL_Event &target_event);
    void on_init();
    void on_start();
    void on_update();

public:
    Application(int &argc, char **argv);
    ~Application();

    int Execute();
};


void handleCharInput(WebView *web_view, const SDL_Event &target_event);

#endif
